class CreateArticles < ActiveRecord::Migration[5.0]
  def change
    create_table :articles do |t|
      t.belongs_to :user,        index: true, comment: '关联用户'
      t.string :title,           index: true, comment: '标题'
      t.text :content,                           comment: '内容'
      t.timestamps
    end
  end
end
